package model;

import java.sql.ResultSet;
import java.sql.SQLException;

public class Course 
{
	public bddConnection connection;
	private int course_id;
	
	public Course(int course_id, bddConnection conn) throws SQLException
	{
		this.connection = conn;
		this.course_id = course_id;
	}
	
	public ResultSet getAllBateau() throws SQLException
	{
		return this.connection.doSql("select bateau.id, nom, est_eau, position_x, position_y " +
				"from bateau LEFT OUTER JOIN coordonnee ON bateau.coordonnee_id = coordonnee.id " +
				"INNER JOIN participe ON participe.bateau_id = bateau.id " +
				"where course_id = " + this.course_id);	
	}
}
